/*
 * 版权所有 (C) 2015 知启蒙(ZHIQIM) 保留所有权利。[遇见知启蒙，邂逅框架梦]
 * 
 * https://zhiqim.org/project/zhiqim_framework/zhiqim_orm.htm
 *
 * Zhiqim Orm is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *          http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */
package org.zhiqim.orm.test.qc.ex;

import org.zhiqim.orm.test.qc.dbo.QcAnswer;

import org.zhiqim.kernel.annotation.AnAlias;
import org.zhiqim.kernel.annotation.AnNew;
import org.zhiqim.kernel.json.Jsons;
import org.zhiqim.orm.annotation.*;

/**
 * 回复扩展表 对应视图《ANSWER_EX》
 */
@AnAlias("AnswerEx")
@AnNew
@AnView("QC_ANSWER,USER_ACCOUNT a,USER_ACCOUNT b")
@AnViewJoin({@AnViewJoinValue(type="EQUAL", lTable="QC_ANSWER", lColumn="ANSWER_USER_ID", rTable="a", rColumn="USER_ID"),
             @AnViewJoinValue(type="LEFT", lTable="QC_ANSWER", lColumn="COMMENT_USER_ID", rTable="b", rColumn="USER_ID")})
public class AnswerEx extends QcAnswer
{
    private static final long serialVersionUID = 1L;

    @AnViewField(table="a", column="USER_NICK")    private String answerUserNick;    //1.
    @AnViewField(table="a", column="USER_AVATAR_50")    private String answerUserAvatar50;    //2.
    @AnViewField(table="b", column="USER_NICK")    private String commentUserNick;    //3.
    @AnViewField(table="b", column="USER_AVATAR_50")    private String commentUserAvatar50;    //4.

    public String toString()
    {
        return Jsons.toString(this);
    }

    public String getAnswerUserNick()
    {
        return answerUserNick;
    }

    public void setAnswerUserNick(String answerUserNick)
    {
        this.answerUserNick = answerUserNick;
    }

    public String getAnswerUserAvatar50()
    {
        return answerUserAvatar50;
    }

    public void setAnswerUserAvatar50(String answerUserAvatar50)
    {
        this.answerUserAvatar50 = answerUserAvatar50;
    }

    public String getCommentUserNick()
    {
        return commentUserNick;
    }

    public void setCommentUserNick(String commentUserNick)
    {
        this.commentUserNick = commentUserNick;
    }

    public String getCommentUserAvatar50()
    {
        return commentUserAvatar50;
    }

    public void setCommentUserAvatar50(String commentUserAvatar50)
    {
        this.commentUserAvatar50 = commentUserAvatar50;
    }

}
